<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thyemeaf.org/thymeleaf-extras-springsecurity4">
<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>首页</title>
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" th:href="@{/i/favicon.png}">
    <link rel="apple-touch-icon-precomposed" th:href="@{/i/app-icon72x72@2x.png}">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="stylesheet" th:href="@{css/amazeui.min.css}" />
    <link rel="stylesheet" th:href="@{/css/admin.css}">
    <link rel="stylesheet" th:href="@{/css/app.css}">
</head>

<body data-type="generalComponents">


    <header class="am-topbar am-topbar-inverse admin-header" >
        <div class="am-topbar-brand">
            <a href="javascript:;" class="tpl-logo">
                <img th:src="@{/img/logo.png}" alt="" >
            </a>
        </div>
        <div class="am-icon-list tpl-header-nav-hover-ico am-fl am-margin-right">

        </div>

        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>

        <div class="am-collapse am-topbar-collapse" id="topbar-collapse">

            <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list tpl-header-list">

                <li class="am-dropdown" data-am-dropdown data-am-dropdown-toggle>
                    <a class="am-dropdown-toggle tpl-header-list-link" href="javascript:;">
                        <span class="tpl-header-list-user-nick">admin</span><span class="tpl-header-list-user-ico"> <img th:src="@{/img/user01.png}"></span>
                    </a>
                    <ul class="am-dropdown-content">
                        <li><a href="#"><span class="am-icon-power-off"></span> 退出</a></li>
                    </ul>
                </li>
                <li><a href="###" class="tpl-header-list-link"><span class="am-icon-sign-out tpl-header-list-ico-out-size"></span></a></li>
            </ul>
        </div>
    </header>





    <div class="tpl-page-container tpl-page-header-fixed">


        <div class="tpl-left-nav tpl-left-nav-hover">
            <div class="tpl-left-nav-title">
                操作列表
            </div>
            <div class="tpl-left-nav-list">
                <ul class="tpl-left-nav-menu">
                    <li class="tpl-left-nav-item">
                        <!-- 打开状态 a 标签添加 active 即可   -->
                        <a href="javascript:;" class="nav-link tpl-left-nav-link-list active">
                            <i class="am-icon-table"></i>
                            <span>数据</span>
                            <!-- 列表打开状态的i标签添加 tpl-left-nav-more-ico-rotate 图表即90°旋转  -->
                            <i class="am-icon-angle-right tpl-left-nav-more-ico am-fr am-margin-right tpl-left-nav-more-ico-rotate"></i>
                        </a>
                        <ul class="tpl-left-nav-sub-menu" style="display:block">
                            <li>
                                <!-- 打开状态 a 标签添加 active 即可   -->
                                <a href="table-font-list.html" class="active">
                                    <i class="am-icon-angle-right"></i>
                                    <span>成员列表</span>
                                    <i class="am-icon-star tpl-left-nav-content-ico am-fr am-margin-right"></i>
                                </a>


             </i>


                            </li>
                        </ul>
                    </li>
                    <li class="tpl-left-nav-item">
                        <a th:href="@{/getGenealogyPage}" class="nav-link tpl-left-nav-link-list">
                            <i class="am-icon-bar-chart"></i>
                            <span>族谱</span>
                        </a>
                    </li>
                </ul>
            </div>
        </div>



        <div class="tpl-content-wrapper">
            <div class="tpl-content-page-title">
                成员列表
            </div>
            <ol class="am-breadcrumb">
                <li><a href="#" class="am-icon-home">首页</a></li>
                <li class="am-active">成员列表</li>
            </ol>
            <div class="tpl-portlet-components">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span> 列表
                    </div>

                </div>
                <div class="tpl-block">
                    <div class="am-g">
                        <div class="am-u-sm-12 am-u-md-6">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <a  th:href="@{/createRoot}" type="button" class="am-btn am-btn-default am-btn-success" th:if="${not #strings.isEmpty(members)}" ><span class="am-icon-plus"></span> 创建第一个成员</a>
                                </div>
                            </div>
                        </div>


                    </div>
                    <div class="am-g">
                        <div class="am-u-sm-12">
                            <form class="am-form">
                                <table class="am-table am-table-striped am-table-hover table-main">
                                    <thead>
                                        <tr>
                                            <th class="table-id">ID</th>
                                            <th class="table-title">姓名</th>
                                            <th class="table-type">性别</th>
                                            <th class="table-author am-hide-sm-only">年龄</th>
                                            <th class="table-date am-hide-sm-only">地址</th>
                                            <th class="table-set">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr th:each="member:${members}">
                                            <td th:text="${member.id}"></td>
                                            <td th:text="${member.name}"></td>
                                            <td th:text="${member.gender}"></td>
                                            <td class="am-hide-sm-only" th:text="${member.age}"></td>
                                            <td class="am-hide-sm-only" th:text="${member.address}"></td>
                                            <td>
                                                <div class="am-btn-toolbar">
                                                    <div class="am-btn-group am-btn-group-xs">
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑信息</button>
                                                        <a th:href="@{/createAccount(id=${member.id})}" class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-pencil-square-o"></span> 生成账户</a>
                                                        <a th:href="@{/createChildren(pid=${member.id},fid=${member.fid})}" class="am-btn am-btn-default am-btn-xs am-hide-sm-only"><span class="am-icon-pencil-square-o"></span> 添加后裔</a>
                                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</button>
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>





                                    </tbody>
                                </table>
                                <div class="am-cf">

                                    <div class="am-fr">
                                        <ul class="am-pagination tpl-pagination">
                                            <li class="am-disabled"><a href="#">«</a></li>
                                            <li class="am-active"><a href="#">1</a></li>
                                            <li><a href="#">2</a></li>
                                            <li><a href="#">3</a></li>
                                            <li><a href="#">4</a></li>
                                            <li><a href="#">5</a></li>
                                            <li><a href="#">»</a></li>
                                        </ul>
                                    </div>
                                </div>
                                <hr>

                            </form>
                        </div>

                    </div>
                </div>
                <div class="tpl-alert"></div>
            </div>

        </div>

    </div>


    <script th:src="@{/js/jquery.min.js}"></script>
    <script th:src="@{/js/amazeui.min.js}"></script>
    <script th:src="@{/js/app.js}"></script>
</body>

</html>